package com.rongke.service.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.rongke.mapper.StatisticsMapper;
import com.rongke.model.MonthSaleReport;
import com.rongke.model.Statistics;
import com.rongke.service.StatisticsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @StatisticsServiceImpl
 * @ServiceImpl
 * @version : Ver 1.0
 */
@Service
public class StatisticsServiceImpl extends ServiceImpl<StatisticsMapper, Statistics> implements StatisticsService {

    @Autowired
    private StatisticsMapper statisticsMapper;

    /**
     * @根据条件查找
     * @param statistics
     * @return
     */
    @Override
    public List<Statistics> selectByCondition(Statistics statistics) {
        return statisticsMapper.selectByCondition(statistics);
    }

    @Override
    public List<MonthSaleReport> getMonthSaleReport(Map condition) {
        return statisticsMapper.getMonthSaleReport(condition);
    }

    @Override
    public List<MonthSaleReport> getMonthCitySaleReport(Map condition) {
        return statisticsMapper.getMonthCitySaleReport(condition);
    }

    @Override
    public List<MonthSaleReport> getMonthCitySaleRateReport(Map condition) {
        return statisticsMapper.getMonthCitySaleRateReport(condition);
    }
}
